<?php
/**
 * بۇ ئۇسلۇب بولسا 小众云 يىزىپ چىققان،TARQAT تەرجىمە قىلىپ ئەلاشتۇرغان.http://www.tarqat.com/
 * 
 * @package Typecho AK92-TARQAT 2018
 * @author Typecho Team
 * @version 2018.1.28
 * @link http://www.tarqat.com/
 */

if (!defined('__TYPECHO_ROOT_DIR__')) exit;
 $this->need('header.php');
 ?>


<section class="content-wrap">
        <div class="container">
            <div class="row">


                <main id="main-content" class="col-md-8 main-content">
               

<?php while($this->next()): ?>

<article id="<?php $this->cid() ?>" class="post">

    <?php if (array_key_exists('star',unserialize($this->___fields()))): ?><div class="featured" title="تەۋسىيەلىك يازما">
        <i class="fa fa-star"></i>
    </div><?php endif; ?>

    <div class="post-head">
        <h1 class="post-title"><a href="<?php $this->permalink() ?>"><?php $this->title() ?></a></h1>
        <div class="post-meta">
            <span class="author">ئاپتور:<a href="<?php $this->author->permalink(); ?>"><?php $this->author(); ?></a></span> •
            <time class="post-date" datetime="<?php $this->date('c'); ?>" title="<?php $this->date('Y-m-d'); ?>"><?php $this->date('Y-m-d'); ?></time>
        </div>
    </div>
    <?php if (array_key_exists('img',unserialize($this->___fields()))): ?>
    <div class="featured-media">
        <a href="<?php $this->permalink() ?>"><img src="<?php $this->fields->img(); ?>" alt="<?php $this->title() ?>"></a>
    </div>
    <?php endif; ?>  

    <!-- 缩略图 -->
    <?php if (array_key_exists('thumb',unserialize($this->___fields()))): ?>

    <div id="index-post-thumb">
        <a class="index-post-cover" href="<?php $this->permalink() ?>">
            <img class="thumb" src="<?php echo $this->fields->thumb;?>">
        </a>
    </div>
    <?php else : ?>
    <?php $thumb = showThumb($this,null,true); if(!empty($thumb)):?>
    <div id="index-post-thumb">
        <a class="index-post-cover" href="<?php $this->permalink() ?>">
            <img class="thumb" src="<?php echo $thumb;?>">
        </a>
    </div>
    <?php endif; ?>
    <?php endif; ?>
    <!--  缩略图-->

    <div class="post-content">
    <?php $this->excerpt(300); ?>
    </div>
    <div class="post-permalink">
        <a href="<?php $this->permalink() ?>" class="btn btn-default">ھەممىنى كۆرۈش</a>
    </div>

    <footer class="post-footer clearfix">
        <div id="pull-left" class="pull-left tag-list">
            <i class="fa fa-folder-open-o"></i>
            <?php $this->tags(' , ', true, 'none'); ?>
        </div>
    </footer>
</article>

<?php endwhile; ?>

<nav id="pagination" class="pagination" role="navigation">
        
        <?php $this->pageLink('<x aria-label="Previous" class="newer-posts"><i class="fa fa-angle-left"></i></x>'); ?>
    <span class="page-number"><?php echo ceil($this->getTotal() / $this->parameter->pageSize); ?>&nbsp;/&nbsp;<?php if($this->_currentPage>1) echo $this->_currentPage;  else echo 1;?> </span>
        <?php $this->pageLink('<x aria-label="Next" class="older-posts"><i class="fa fa-angle-right"></i></x>','next'); ?>
</nav>


                </main>


<?php $this->need('sidebar.php'); ?>

            </div class="row">
        </div class="container">
</section>


<?php $this->need('footer.php'); ?>
